<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
            /* 透视属性,加给父级,建议值在800-1200 近大远小*/
            /* perspective: 800px; */
            body{
                perspective:800px;
            }
        /* 1、空间转换 */
        .box1{
            width: 200px;
            height: 200px;
            background-color: aquamarine;
            transition: all 1s;
            margin: 0 auto; 
        }
        .box1:hover{
            /* 空间转换,XYZ三个值 */
            transform: translateX(400px) ;
            /* 空间缩放 */
            transform: scale(2);
        }

        /* 2、空间旋转 */
        .box2{
            width: 200px;
            height: 200px;
            background-color: rgb(121, 54, 54);
            transition: all 1s;
            margin: 100px auto;
        }
        .box2:hover{
            transform: rotateZ(360deg);
        }
    </style>
</head>
<body>
    <div class="box1">空间转换</div>
    <div class="box2">空间旋转</div>
</body>
</html>